HAL RTC TimeStamp functions migration ¶
This section provides information about the HAL RTC timestamp functions migration.
Note
The RTC handle is removed in HAL2, so for the following RTC HAL2 functions, the handle will be removed from the parameters.
Related concept: Other HAL RTC changes
HAL RTC set time stamp ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp(RTC_HandleTypeDef *hrtc,
uint32_t TimeStampEdge,
uint32_t RTC_TimeStampPin)
|
hal_status_t HAL_RTC_TIMESTAMP_SetConfig(const hal_rtc_timestamp_config_t *p_config_timestamp)
hal_status_t HAL_RTC_TIMESTAMP_EnablePinSource(void)
|
HAL RTC set time stamp IT ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp_IT(RTC_HandleTypeDef *hrtc,
uint32_t TimeStampEdge,
uint32_t RTC_TimeStampPin)
|
hal_status_t HAL_RTC_TIMESTAMP_SetConfig(const hal_rtc_timestamp_config_t *p_config_timestamp)
hal_status_t HAL_RTC_TIMESTAMP_EnablePinSource(void)
hal_status_t HAL_RTC_TIMESTAMP_EnableIT(void)
|
HAL RTC deactivate time stamp ¶
|
HAL1 |
HAL2 |
|---|---|
/* */
HAL_StatusTypeDef HAL_RTCEx_DeactivateTimeStamp(RTC_HandleTypeDef *hrtc)
|
/* This function is enough to disable the TimeStamp: */
hal_status_t HAL_RTC_TIMESTAMP_DisablePinSource(void)
/* If needed to disable the interruption of the TimeStamp separately, you can use this function */
hal_status_t HAL_RTC_TIMESTAMP_DisableIT(void)
|
HAL RTC set internal time stamp ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_StatusTypeDef HAL_RTCEx_SetInternalTimeStamp(RTC_HandleTypeDef *hrtc)
|
hal_status_t HAL_RTC_TIMESTAMP_EnableInternalSource(void)
|
HAL RTC deactivate internal time stamp ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_StatusTypeDef HAL_RTCEx_DeactivateInternalTimeStamp(RTC_HandleTypeDef *hrtc)
|
hal_status_t HAL_RTC_TIMESTAMP_DisableInternalSource(void)
|
HAL RTC get time stamp ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_StatusTypeDef HAL_RTCEx_GetTimeStamp(RTC_HandleTypeDef *hrtc,
RTC_TimeTypeDef *sTimeStamp,
RTC_DateTypeDef *sTimeStampDate,
uint32_t Format)
|
hal_status_t HAL_RTC_TIMESTAMP_GetDateTime(hal_rtc_time_t *p_time,
hal_rtc_date_t *p_date,
hal_rtc_timestamp_information_t *p_info)
hal_status_t HAL_RTC_TIMESTAMP_GetBinaryTime(uint32_t *p_time_subseconds,
hal_rtc_timestamp_information_t *p_info)
|
HAL RTC time stamp IRQ handler ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_RTCEx_TimeStampIRQHandler(RTC_HandleTypeDef *hrtc)
|
void HAL_RTC_TIMESTAMP_IRQHandler(void)
|
HAL RTC poll for time stamp event ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_StatusTypeDef HAL_RTCEx_PollForTimeStampEvent(RTC_HandleTypeDef *hrtc,
uint32_t Timeout)
|
hal_status_t HAL_RTC_TIMESTAMP_PollForEvent(uint32_t timeout_ms);
|
HAL RTC time stamp event callback ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_RTCEx_TimeStampEventCallback(RTC_HandleTypeDef *hrtc)
|
void HAL_RTC_TimestampEventCallback(void)
|